﻿using _01_Tower4._0.GameFrame.System;
using _01_Tower4._0.Interface;
using _01_Tower4._0.Skills.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01_Tower4._0.Skills
{
    internal class ArcaneMissiles : AtkSkill
    {
        public ArcaneMissiles() : base(50, "奥术飞弹", "可以造成大量伤害。(冷却：3回合。)", "使用了奥术飞弹", 3, 10, 20)
        {
        }

        public override void Use(IAttack target, IAttack caster)
        {
            if (Cd != 0)
            {
                InfoSystem.Instance.AddInfo($"{Name}仍在冷却中", ConsoleColor.Red);
                return;
            }
            caster.Mp -= Mp;
            if(caster.Mp <= 0)
            {
                InfoSystem.Instance.AddInfo($"法力值不足", ConsoleColor.Red);
                caster.Mp += Mp;
                return;
            }
            target.Hp -= Damage;
            InfoSystem.Instance.AddInfo(caster.Name + FeedBack);
            InfoSystem.Instance.AddInfo($"{caster.Name}对{target.Name}造成了{Damage}点伤害");
            base.Use(target, caster);
            Cd = 3;
        }
    }
}
